//卸下灵宝 {"序列":1,"类型":"灵宝"}
// @ts-ignore
export async function execute(client_id,message_json) {
    let characters = G.Characters.get_current_login_characters(client_id);
    let index = message_json["序列"] - 1;
    let target = characters["灵宝佩戴"][index];
    if (target === undefined || target === null) {
        ClientUtils.send_basic_prompt(client_id, "该位置未装备灵宝");
    }
    let tmp_target = Object.assign({}, target);
    characters["灵宝佩戴"][index] = null;
    //寻找一个空位放入法宝背包
    let spce_index = -1;
    for (let index = 0; index < characters["灵宝"].length; index++) {
        const element = characters["灵宝"][index];
        if (element === null) {
            spce_index = index;
            break;
        }
    }
    if (spce_index !== -1) {
        characters["灵宝"][spce_index] = tmp_target;
    } else {
        characters["灵宝"].push(tmp_target);
    }
    G.Characters.refrush_fabao_data(characters);
}